import request from '@/api/request'

function getActiveList(data) {
    return request({
        url: '/lejuAdmin/homeRecommend/findAllRecommends',
        data,

    })
}

function delActiveList(recommendId, data) {
    return request({
        url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
        data,
        method: 'DELETE'
    })
}

function getProducts(start, limit, data) {
    return request({
        url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
        data,
        method: 'POST'
    })
}

function findAllbrand(data) {
    return request({
        url: "/lejuAdmin/brand/findAllBrand",
        data,
    })
}

function addActive(data) {
    return request({
        url: `/lejuAdmin/homeRecommend/addRecommend`,
        data,
        method: 'POST'
    })
}

function findAd(data) {
    return request({
        url: '/lejuAdmin/advertise/adsList',
        data,

    })
}

function delAds(adsId, data) {
    return request({
        url: `/lejuAdmin/advertise/delAds/${adsId}`,
        data,
        method: 'DELETE'
    })
}

function addAds(data) {
    return request({
        url: '/lejuAdmin/advertise/addAds',
        data,
        method: 'POST'
    })
}

function updateAds(data) {
    return request({
        url: "/lejuAdmin/advertise/updateAds",
        data,
        method: 'POST'
    })
}
export {
    getActiveList,
    delActiveList,
    getProducts,
    findAllbrand,
    addActive,
    findAd,
    delAds,
    addAds,
    updateAds


}